package com.ln.lnzw.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ln.lnzw.R;
import com.ln.lnzw.bean.ImplementationSubjectBean;
import com.ln.lnzw.bean.ServiceObjectBean;

import java.util.List;

/**
 * Created by wuwei on 2018/4/24.
 * 法人适配器
 */

public class ServiceObjectLegalAdapter extends BaseQuickAdapter<ServiceObjectBean.ResultBean,BaseViewHolder>{
    private ImageView imageView;

    public ServiceObjectLegalAdapter(int layoutResId, @Nullable List<ServiceObjectBean.ResultBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ServiceObjectBean.ResultBean item) {
        switch (item.getCode()){
            case "005":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_005);
                break;
            case "010":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_010);
                break;
            case "015":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_015);
                break;
            case "020":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_020);
                break;
            case "025":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_025);
                break;
            case "030":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_030);
                break;
            case "035":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_035);
                break;
            case "040":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_040);
                break;
            case "045":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_045);
                break;
            case "050":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_050);
                break;
            case "055":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_055);
                break;
            case "060":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_060);
                break;
            case "065":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_065);
                break;
            case "070":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_070);
                break;
            case "075":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_075);
                break;
            case "085":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_085);
                break;
            case "090":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_090);
                break;
            case "095":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_095);
                break;
            case "100":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_100);
                break;
            case "105":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_105);
                break;
            case "110":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_110);
                break;
            case "115":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_115);
                break;
            case "120":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_120);
                break;
            case "125":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_125);
                break;
            case "130":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_130);
                break;
            case "135":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_135);
                break;
            case "140":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_140);
                break;
            case "145":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_145);
                break;
            case "150":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_150);
                break;
            case "155":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_155);
                break;
            case "160":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_160);
                break;
            case "165":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_165);
                break;
            case "170":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_170);
                break;
            case "999":
                helper.setText(R.id.name,item.getName());
                imageView=helper.getView(R.id.image);
                imageView.setImageResource(R.mipmap.f_999);
                break;
        }
    }
}
